import request from '@/utils/request'

//查询树节点（带子节点）
export function getTreeData(query){
  return request({
    url: '/analysiscenter/assetCategory/list',
    method:'get',
    params:query
  })
}
//查询树节点（不带子节点）
export function queryAssetCategoryTree(query){
  return request({
    url: '/analysiscenter/assetCategory/queryAssetCategoryTree',
    method:'get',
    params:query
  })
}


//新增树节点
export function addTrees(data) {
  return request({
    url: '/analysiscenter/assetCategory/add',
    method: 'post',
    data,
  })
}

//编辑树节点
export function editTrees(data) {
  return request({
    url: '/analysiscenter/assetCategory/edit',
    method: 'post',
    data,
  })
}
//树节点详情
export function getInfoTrees(query) {
  return request({
    url: '/analysiscenter/assetCategory/getInfo',
    method: 'get',
    params:query,
  })
}
//刪除树节点
export function delTrees(data) {
  return request({
    url: '/analysiscenter/assetCategory/remove',
    method: 'post',
    data,
  })
}
//树节点删除前
export function delTreesForCheck(data) {
  return request({
    url: '/analysiscenter/assetCategory/removeCheck',
    method: 'post',
    data,
  })
}
//查询列表
export function assetsTypeList(query){
  return request({
    url: '/analysiscenter/assetCategoryConfig/list',
    method:'get',
    params:query
  })
}
//新增
export function assetsTypeAdd(data) {
  return request({
    url: '/analysiscenter/assetCategoryConfig/add',
    method: 'post',
    data,
  })
}
//编辑
export function assetsTypeEdit(data) {
  return request({
    url: '/analysiscenter/assetCategoryConfig/edit',
    method: 'post',
    data,
  })
}
//删除
export function assetsTypeDel(data) {
  return request({
    url: '/analysiscenter/assetCategoryConfig/remove',
    method: 'post',
    data,
  })
}
//厂家
export function getFactory(query){
  return request({
    url: '/analysiscenter/assetCategoryConfig/getFactory',
    method:'get',
    params:query
  })
}

//删除前校验
export function deleteForCheck(data) {
  return request({
    url: '/analysiscenter/assetCategoryConfig/removeCheck',
    method: 'post',
    data,
  })
}
//解析分组下拉
export function getGrouping(query) {
  return request({
    url: '/analysiscenter/assetCategory/queryTypeCode',
    method: 'get',
    params: query
  })
}

//解析分组下拉
export function getInfo(query) {
  return request({
    url: '/analysiscenter/assetCategoryConfig/getInfo',
    method: 'get',
    params: query
  })
}


